Skip to content

Moving the region update statement till after it has been extracted from arn #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

rnowosielski
Copy link

It is a really small fix but it took me some time to figure this out. The error I was getting is:

Running "lambda_deploy:default" (lambda_deploy) task 
Warning: Unable to find lambda function arn:aws:lambda:eu-west-1:<redacted>:function:<redacted>, verify the lambda function name and AWS region are correct. Use --force to continue.

In my grunt file I have had added the following snippet to the initConfig

    lambda_deploy: {
          default: {
                 arn: "arn:aws:lambda:eu-west-1:<redaced>:function:<redacted>",
                 options: {
                 }
          }
    }

The docs specify other option as optional "if the ARN is provided"

 Specify the AWS region your functions will be uploaded to. Note that if an ARN is supplied this option is not required.

At last I started looking through the code to see what is happening and realised that if I don't specify region in the options, it is being extracted from the ARN, but a little bit too late.

I'm moving it below couple line, so that it works in both cases - either region provided by options or extracted from ARN.

@rnowosielski
Copy link
Author

There is already pull request fixing this #74. I missed it checking initially: I guess I was looking through reported issues, and forgot to see if a PR fixing this is already in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant